package cn.foolishbird.crow.structure.tree;

import java.util.List;

/**
 * @author  foolish-bird
 */
public class TreeNode<T> {

    /**
     * 树节点Id
     */
    private Long id;

    /**
     * 树父节点id
     */
    private Long parentId;

    /**
     * 节点数据
     */
    private T node;

    /**
     * 子节点
     */
    private List<TreeNode<T>> children;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public T getNode() {
        return node;
    }

    public void setNode(T node) {
        this.node = node;
    }

    public List<TreeNode<T>> getChildren() {
        return children;
    }

    public void setChildren(List<TreeNode<T>> children) {
        this.children = children;
    }
}
